<%--
  Created by IntelliJ IDEA.
  User: hongcy
  Date: 16-3-21
  Time: 下午2:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>Business Login Page</title>
</head>
<body>
<script type="text/javascript">
    /*alert("浏览器版本："+navigator.appVersion);
     alert("浏览器类型："+navigator.appName);
     alert("操作系统："+typeof(navigator.platform)=="undefined"?"":navigator.platform);*/
    function test() {
        var MobileUA = (function () {
            var ua = navigator.userAgent.toLowerCase();
            var mua = {
                IOS: /ipod|iphone|ipad/.test(ua), //iOS
                IPHONE: /iphone/.test(ua), //iPhone
                IPAD: /ipad/.test(ua), //iPad
                ANDROID: /android/.test(ua), //Android Device
                WINDOWS: /windows/.test(ua), //Windows Device
                TOUCH_DEVICE: ('ontouchstart' in window) || /touch/.test(ua), //Touch Device
                MOBILE: /mobile/.test(ua), //Mobile Device (iPad)
                ANDROID_TABLET: false, //Android Tablet
                WINDOWS_TABLET: false, //Windows Tablet
                TABLET: false, //Tablet (iPad, Android, Windows)
                SMART_PHONE: false //Smart Phone (iPhone, Android)
            };

            mua.ANDROID_TABLET = mua.ANDROID && !mua.MOBILE;
            mua.WINDOWS_TABLET = mua.WINDOWS && /tablet/.test(ua);
            mua.TABLET = mua.IPAD || mua.ANDROID_TABLET || mua.WINDOWS_TABLET;
            mua.SMART_PHONE = mua.MOBILE && !mua.TABLET;

            return mua;
        }());

        //SmartPhone
        var tt = MobileUA.SMART_PHONE;
        if (tt) {
            // 移动端链接地址
            $("#loginType").val(2);
            alert("移动端");
        } else {
            alert("pc端");
        }
        alert(tt);
        console.info(MobileUA);
        alert(MobileUA);
    }

    function uaredirect(f) {
        try {
            if (document.getElementById("bdmark") != null) {
                return
            }
            var b = false;
            if (arguments[1]) {
                var e = window.location.host;
                var a = window.location.href;
                if (isSubdomain(arguments[1], e) == 1) {
                    f = f + "/#m/" + a;
                    b = true
                } else {
                    if (isSubdomain(arguments[1], e) == 2) {
                        f = f + "/#m/" + a;
                        b = true
                    } else {
                        f = a;
                        b = false
                    }
                }
            } else {
                b = true
            }
            if (b) {
                var c = window.location.hash;
                if (!c.match("fromapp")) {
                    if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|SymbianOS)/i))) {
                        location.replace(f)
                    }
                }
            }
        } catch(d) {}
    }
        var sUserAgent = navigator.userAgent.toLowerCase();
        if(sUserAgent.indexOf('windows') != -1){
            window.location.href='../seller/pc_login.jsp';
        }else if(sUserAgent.indexOf('android')!= -1 || sUserAgent.indexOf('iphone')!= -1){
            window.location.href='../seller/phone_login.jsp';
        }else{
            window.location.href='../seller/pc_login.jsp';
        }

</script>
</body>
</html>
